<head>
    <script src="./vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-for="(item,index) in list" data-id="index" v-if="isShow">
            索引是：{{index}},内容是{{item}}
        </div>
        <button @click="isShow=!isShow">显示/隐藏</button>
    </div>
</body>
<script>
    var vue = new Vue({
        el: '#app',
        data: {
            list: [1, 2, 34, 5, 6],
            isShow: true,
        }
    })
</script>